DROP TABLE CRST_AR_BATCHES_ALL;

CREATE TABLE CRST_AR_BATCHES_ALL
(
  BATCH_ID                    NUMBER(15)        NOT NULL,
  LAST_UPDATED_BY             NUMBER(15)        NOT NULL,
  LAST_UPDATE_DATE            DATE              NOT NULL,
  LAST_UPDATE_LOGIN           NUMBER(15),
  CREATED_BY                  NUMBER(15)        NOT NULL,
  CREATION_DATE               DATE              NOT NULL,
  NAME                        VARCHAR2(20 BYTE) NOT NULL,
  BATCH_DATE                  DATE              NOT NULL,
  GL_DATE                     DATE,
  STATUS                      VARCHAR2(20 BYTE),
  DEPOSIT_DATE                DATE,
  CLOSED_DATE                 DATE,
  TYPE                        VARCHAR2(30 BYTE) NOT NULL,
  BATCH_SOURCE_ID             NUMBER(15)        NOT NULL,
  CONTROL_COUNT               NUMBER(15),
  CONTROL_AMOUNT              NUMBER,
  BATCH_APPLIED_STATUS        VARCHAR2(30 BYTE) NOT NULL,
  CURRENCY_CODE               VARCHAR2(15 BYTE) NOT NULL,
  EXCHANGE_RATE_TYPE          VARCHAR2(30 BYTE),
  EXCHANGE_DATE               DATE,
  EXCHANGE_RATE               NUMBER,
  TRANSMISSION_REQUEST_ID     NUMBER(15),
  LOCKBOX_ID                  NUMBER(15),
  LOCKBOX_BATCH_NAME          VARCHAR2(25 BYTE),
  COMMENTS                    VARCHAR2(240 BYTE),
  ATTRIBUTE_CATEGORY          VARCHAR2(30 BYTE),
  ATTRIBUTE1                  VARCHAR2(150 BYTE),
  ATTRIBUTE2                  VARCHAR2(150 BYTE),
  ATTRIBUTE3                  VARCHAR2(150 BYTE),
  ATTRIBUTE4                  VARCHAR2(150 BYTE),
  ATTRIBUTE5                  VARCHAR2(150 BYTE),
  ATTRIBUTE6                  VARCHAR2(150 BYTE),
  ATTRIBUTE7                  VARCHAR2(150 BYTE),
  ATTRIBUTE8                  VARCHAR2(150 BYTE),
  ATTRIBUTE9                  VARCHAR2(150 BYTE),
  ATTRIBUTE10                 VARCHAR2(150 BYTE),
  MEDIA_REFERENCE             VARCHAR2(80 BYTE),
  OPERATION_REQUEST_ID        NUMBER(15),
  RECEIPT_METHOD_ID           NUMBER(15),
  REMITTANCE_BANK_ACCOUNT_ID  NUMBER(15),
  RECEIPT_CLASS_ID            NUMBER(15),
  ATTRIBUTE11                 VARCHAR2(150 BYTE),
  ATTRIBUTE12                 VARCHAR2(150 BYTE),
  ATTRIBUTE13                 VARCHAR2(150 BYTE),
  ATTRIBUTE14                 VARCHAR2(150 BYTE),
  ATTRIBUTE15                 VARCHAR2(150 BYTE),
  PROGRAM_APPLICATION_ID      NUMBER(15),
  PROGRAM_ID                  NUMBER(15),
  PROGRAM_UPDATE_DATE         DATE,
  REMITTANCE_BANK_BRANCH_ID   NUMBER(15),
  REMIT_METHOD_CODE           VARCHAR2(30 BYTE),
  REQUEST_ID                  NUMBER(15),
  SET_OF_BOOKS_ID             NUMBER(15)        NOT NULL,
  TRANSMISSION_ID             NUMBER(15),
  BANK_DEPOSIT_NUMBER         VARCHAR2(30 BYTE),
  ORG_ID                      NUMBER(15),
  PURGED_CHILDREN_FLAG        VARCHAR2(1 BYTE),
  WITH_RECOURSE_FLAG          VARCHAR2(1 BYTE),
  AUTO_PRINT_PROGRAM_ID       NUMBER(15),
  AUTO_TRANS_PROGRAM_ID       NUMBER(15),
  BATCH_ID_N                  NUMBER(15) 
);
